﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace MyWpfApplication_CS
{
	/// <summary>
	/// Interaction logic for MyInnerAwesomerControl.xaml
	/// </summary>
	public partial class MyInnerAwesomerControl : UserControl
	{
		public MyInnerAwesomerControl()
		{
			InitializeComponent();
		}

		private void Button_Click(object sender, RoutedEventArgs e)
		{
			RaiseMyAwesomerControlClickEvent();
		}

		public static readonly RoutedEvent MyInnerAwesomerControlClickEvent = EventManager.RegisterRoutedEvent("MyInnerAwesomerControlClick", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(MyInnerAwesomerControl));

		public event RoutedEventHandler MyInnerAwesomerControlClick
		{
			add { AddHandler(MyInnerAwesomerControlClickEvent, value); }
			remove { RemoveHandler(MyInnerAwesomerControlClickEvent, value); }
		}

		void RaiseMyAwesomerControlClickEvent()
		{
			RoutedEventArgs newEventArgs = new RoutedEventArgs(MyInnerAwesomerControl.MyInnerAwesomerControlClickEvent);
			RaiseEvent(newEventArgs);
		}
	}
}
